package com.chaoxing.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 
 * @TableName t_course
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Course extends BaseRowModel implements Serializable {


    private Integer id;
    @ExcelProperty(value = {"courseno"}, index = 0)
    private String courseno;
    @ExcelProperty(value = {"coursename"}, index = 1)
    private String coursename;
    @ExcelProperty(value = {"totalperiod"}, index = 2)
    private String totalperiod;
    @ExcelProperty(value = {"credit"}, index = 3)
    private Integer credit;
    @ExcelProperty(value = {"faculty"}, index = 4)
    private String faculty;
    @ExcelProperty(value = {"category"}, index = 5)
    private String category;
    @ExcelProperty(value = {"score"}, index = 6)
    private String score;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public String getCourseno() {
        return courseno;
    }

    /**
     * 
     */
    public void setCourseno(String courseno) {
        this.courseno = courseno;
    }

    /**
     * 
     */
    public String getCoursename() {
        return coursename;
    }

    /**
     * 
     */
    public void setCoursename(String coursename) {
        this.coursename = coursename;
    }

    /**
     * 
     */
    public String getTotalperiod() {
        return totalperiod;
    }

    /**
     * 
     */
    public void setTotalperiod(String totalperiod) {
        this.totalperiod = totalperiod;
    }

    /**
     * 
     */
    public Integer getCredit() {
        return credit;
    }

    /**
     * 
     */
    public void setCredit(Integer credit) {
        this.credit = credit;
    }

    /**
     * 
     */
    public String getFaculty() {
        return faculty;
    }

    /**
     * 
     */
    public void setFaculty(String faculty) {
        this.faculty = faculty;
    }

    /**
     * 
     */
    public String getCategory() {
        return category;
    }

    /**
     * 
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * 
     */
    public String getScore() {
        return score;
    }

    /**
     * 
     */
    public void setScore(String score) {
        this.score = score;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Course other = (Course) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCourseno() == null ? other.getCourseno() == null : this.getCourseno().equals(other.getCourseno()))
            && (this.getCoursename() == null ? other.getCoursename() == null : this.getCoursename().equals(other.getCoursename()))
            && (this.getTotalperiod() == null ? other.getTotalperiod() == null : this.getTotalperiod().equals(other.getTotalperiod()))
            && (this.getCredit() == null ? other.getCredit() == null : this.getCredit().equals(other.getCredit()))
            && (this.getFaculty() == null ? other.getFaculty() == null : this.getFaculty().equals(other.getFaculty()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCourseno() == null) ? 0 : getCourseno().hashCode());
        result = prime * result + ((getCoursename() == null) ? 0 : getCoursename().hashCode());
        result = prime * result + ((getTotalperiod() == null) ? 0 : getTotalperiod().hashCode());
        result = prime * result + ((getCredit() == null) ? 0 : getCredit().hashCode());
        result = prime * result + ((getFaculty() == null) ? 0 : getFaculty().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", courseno=").append(courseno);
        sb.append(", coursename=").append(coursename);
        sb.append(", totalperiod=").append(totalperiod);
        sb.append(", credit=").append(credit);
        sb.append(", faculty=").append(faculty);
        sb.append(", category=").append(category);
        sb.append(", score=").append(score);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}